<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">



        var a = 10;
        console.log(a);

        for (var i = 0; i < 10; i++) {
            console.log(i);

            b = 80;
        }

        console.log(b);
        console.log(i);
        //var会自动作为全局变量而使用

        let f = "haha";
        console.log(f);

        for (let j = 0; j < 10; j++) {
            console.log(j);
        }
        console.log(j);
        //let是用来声明变量的，局部变量


       let arr = new Array(5);

       const arr1= new Array(5);

       arr = arr1;

       arr.push(0);
       arr.push(1);
       arr.push(2);
       arr.push(3);
       arr.push(4);
       arr.push(5);
       arr.push(6);

    </script>
</head>
<body>

</body>
</html>